using IcsSEMCtrl.Util;
using System;
namespace IcsSEMCtrl.Global.Device
{
	public class EquipmentType
	{
		public const int _DEVICE = 0;
		public const int _STOCKER = 1;
		public const int _LIFTER = 2;
		public const int _OHS = 3;
		public const int _OHT = 4;
		public const int _AGV = 5;
		public const int _PROCESS = 6;
		private int _value;
		private static int _size;
		private static EquipmentType[] _array;
		public static string[] displayStrings;
		public static EquipmentType[] displayValues;
		public static EquipmentType DEVICE;
		public static EquipmentType STOCKER;
		public static EquipmentType LIFTER;
		public static EquipmentType OHS;
		public static EquipmentType OHT;
		public static EquipmentType AGV;
		public static EquipmentType PROCESS;
		public static EquipmentType IT_ENUM_MAX;
		static EquipmentType()
		{
			EquipmentType._size = 7;
			EquipmentType._array = new EquipmentType[EquipmentType._size];
			EquipmentType.displayStrings = new string[EquipmentType._size];
			EquipmentType.displayValues = new EquipmentType[EquipmentType._size];
			EquipmentType.DEVICE = new EquipmentType(0);
			EquipmentType.STOCKER = new EquipmentType(1);
			EquipmentType.LIFTER = new EquipmentType(2);
			EquipmentType.OHS = new EquipmentType(3);
			EquipmentType.OHT = new EquipmentType(4);
			EquipmentType.AGV = new EquipmentType(5);
			EquipmentType.PROCESS = new EquipmentType(6);
			EquipmentType.IT_ENUM_MAX = new EquipmentType(2147483647);
			EquipmentType.displayStrings[0] = "Device";
			EquipmentType.displayStrings[1] = "Stocker";
			EquipmentType.displayStrings[2] = "Lifter";
			EquipmentType.displayStrings[3] = "OHS";
			EquipmentType.displayStrings[4] = "OHT";
			EquipmentType.displayStrings[5] = "AGV ";
			EquipmentType.displayStrings[6] = "PROCESS ";
			EquipmentType.displayValues[0] = EquipmentType.DEVICE;
			EquipmentType.displayValues[1] = EquipmentType.STOCKER;
			EquipmentType.displayValues[2] = EquipmentType.LIFTER;
			EquipmentType.displayValues[3] = EquipmentType.OHS;
			EquipmentType.displayValues[4] = EquipmentType.OHT;
			EquipmentType.displayValues[5] = EquipmentType.AGV;
			EquipmentType.displayValues[6] = EquipmentType.PROCESS;
		}
		public static string ValueToString(EquipmentType val)
		{
			string result;
			switch (val.Value())
			{
			case 0:
				result = EquipmentType.displayStrings[0];
				break;
			case 1:
				result = EquipmentType.displayStrings[1];
				break;
			case 2:
				result = EquipmentType.displayStrings[2];
				break;
			case 3:
				result = EquipmentType.displayStrings[3];
				break;
			case 4:
				result = EquipmentType.displayStrings[4];
				break;
			case 5:
				result = EquipmentType.displayStrings[5];
				break;
			case 6:
				result = EquipmentType.displayStrings[6];
				break;
			default:
				result = "";
				break;
			}
			return result;
		}
		public static EquipmentType StringToValue(string val)
		{
			EquipmentType result;
			if (Helper.IsNullOrEmpty(val))
			{
				result = EquipmentType.IT_ENUM_MAX;
			}
			else
			{
				for (int i = 0; i < EquipmentType.displayStrings.Length; i++)
				{
					if (val.Equals(EquipmentType.displayStrings[i]))
					{
						result = EquipmentType.displayValues[i];
						return result;
					}
				}
				result = null;
			}
			return result;
		}
		public int Value()
		{
			return this._value;
		}
		public static EquipmentType From_Int(int value)
		{
			EquipmentType result;
			if (value >= 0 && value < EquipmentType._size)
			{
				result = EquipmentType._array[value];
			}
			else
			{
				result = EquipmentType.IT_ENUM_MAX;
			}
			return result;
		}
		protected EquipmentType(int value)
		{
			this._value = value;
			if (value >= 0 && value < EquipmentType._size)
			{
				EquipmentType._array[this._value] = this;
			}
		}
		public bool Equals(EquipmentType otherEnum)
		{
			return otherEnum.Value() == this._value;
		}
		public override string ToString()
		{
			return EquipmentType.displayStrings[this._value];
		}
	}
}
